let liveServer = require('live-server')
let path = require('path')

let params = {
    port: 31366, // Set the server port. Defaults to 8080.
    host: 'localhost', // Set the address to bind to. Defaults to 0.0.0.0 or process.env.IP.
    root: path.join(__dirname, '../css3-animation'), // Set root directory that's being served. Defaults to cwd.
    open: false, // When false, it won't load your browser by default.
    ignore: 'java,jsAlgorithm,resource,page/babelDemo,rollupDemo', // comma-separated string for paths to ignore
    file: 'index.html', // When set, serve this file for every 404 (useful for single-page applications)
    wait: 1000, // Waits for all changes, before reloading. Defaults to 0 sec.
    // mount: [['/components', './node_modules']], // Mount a directory to a route.
    logLevel: 2, // 0 = errors only, 1 = some, 2 = lots
    // Takes an array of Connect-compatible middleware that are injected into the server middleware stack
    middleware: [function (req, res, next) {
        next()
    }]
}
liveServer.start(params)